/* 导入基础样式 */
@import 'base.css';

/* 导入布局样式 */
@import 'layout.css';

/* 导入工具类 */
@import 'utilities.css';

/* 导入动画 */
@import 'animations.css';

/* 导入组件样式 */
@import 'components/button.css';
@import 'components/form.css';
@import 'components/modal.css';
@import 'components/table.css';
@import 'components/toast.css';
@import 'components/toolbar.css';
@import 'components/chart.css';
@import 'components/card.css';

/* 导入页面样式 */
@import 'pages/comparison.css';

/* 全局变量 */
:root {
    --primary-bg: #1a1d21;
    --secondary-bg: #22262b;
    --card-bg: #2a2e33;
    --border-color: #383c41;
    --text-primary: #ffffff;
    --text-secondary: #a0a4a8;
    --accent-blue: #1890ff;
    --accent-green: #52c41a;
    --accent-red: #ff4d4f;
    --accent-yellow: #faad14;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 基础样式 */
body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
}

/* 应用容器 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航 */
.top-nav {
    background-color: var(--secondary-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 内容包装器 */
.content-wrapper {
    display: flex;
    flex: 1;
}

/* 侧边菜单 */
.side-menu {
    width: 220px;
    background-color: var(--secondary-bg);
    padding: 1rem 0;
    border-right: 1px solid var(--border-color);
}

.menu-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-item i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.menu-item.active {
    background-color: var(--accent-blue);
    color: white;
}

.menu-item:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* 统计卡片 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(24, 144, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--accent-blue);
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-trend {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.stat-trend.positive {
    color: var(--accent-green);
}

.stat-trend.negative {
    color: var(--accent-red);
}

/* 图表区域 */
.chart-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
}

.chart-container.primary {
    height: 400px;
}

.chart-container.secondary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sub-chart {
    flex: 1;
    min-height: 200px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.time-range {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    outline: none;
}

/* 系统监控 */
.system-monitor {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.monitor-header {
    margin-bottom: 1.5rem;
}

.monitor-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.monitor-item {
    background-color: var(--secondary-bg);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.monitor-label {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.monitor-label i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.monitor-value {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    background-color: rgba(24, 144, 255, 0.1);
    color: var(--accent-blue);
}

.monitor-value.warning {
    background-color: rgba(250, 173, 20, 0.1);
    color: var(--accent-yellow);
}

.monitor-value.danger {
    background-color: rgba(255, 77, 79, 0.1);
    color: var(--accent-red);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .chart-section {
        grid-template-columns: 1fr;
    }
    
    .chart-container.secondary {
        flex-direction: row;
    }
    
    .sub-chart {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .side-menu {
        width: 60px;
    }
    
    .menu-item span {
        display: none;
    }
    
    .menu-item i {
        margin: 0;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
    }
    
    .chart-container.secondary {
        flex-direction: column;
    }
    
    .sub-chart {
        width: 100%;
    }
    
    .monitor-grid {
        grid-template-columns: 1fr;
    }
} 